﻿@{
    string cultureISO = new System.Globalization.CultureInfo(Culture).TwoLetterISOLanguageName;
}
<!DOCTYPE html>
<html lang="@cultureISO">
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Images/favicon.ico")" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/localize")
    @Scripts.Render("~/bundles/jqueryui")
    @Scripts.Render("~/bundles/common")
    @Scripts.Render("~/bundles/modernizr")
    @Html.MetaAcceptLanguage()
</head>
<body>
    <div class="page">
        <header>
            <div id="header">
                <div id="title">
                    <h1>@Resources.Shared.AppName</h1>
                </div>
                <div id="menucontainer">
                    @Html.Partial("_Menu")
                    <div id="logindisplay">
                        @Html.Partial("_LoginPartial")
                    </div>
                </div>
            </div>
        </header>
        <div id="main">
            <div id="messages">
                @TempData["UserMessage"]
            </div>
            <div id="language">
                @Html.Partial("_ChooseCulture")
            </div>
            @RenderBody()
        </div>
        <footer>
            <div id="footer">
            </div>
        </footer>
    </div>
    @{ 
        string errorPage = Url.Action("Error", "Home");
        string culture = new System.Globalization.CultureInfo(Culture).ToString();
    }
    <script type="text/javascript">
        errorPage = "@errorPage";

        $(document).ready(function () {
            var data = "@culture";
            Globalize.culture(data);
        });
    </script>
    @RenderSection("scripts", required: false)
</body>
</html>
